package com.flute.icrawler.config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CrawlConfig implements Serializable {
	private ProcessorConfig processorConfig;
	private Url url;
	private int frameworkPrintInterval;
	private int startHardwareAdjust;
	private int startUpdate;
	private int needAppend;
	private Update update;
	private RegUrl regurl;
	private List<ExtractorBelongingsAlgo> extractorBelongingsAlgos = new ArrayList<ExtractorBelongingsAlgo>();

	private String taskName = "";

	public RegUrl getRegurl() {
		return regurl;
	}

	public void setRegurl(RegUrl regurl) {
		this.regurl = regurl;
	}

	/**
	 * 获取启动硬件资源调整策略 0不启动 1启动
	 * 
	 * @return
	 */
	public int getStartHardwareAdjust() {
		return startHardwareAdjust;
	}

	/**
	 * 设置启动硬件资源调整策略 0不启动 1启动
	 * 
	 * @param startHardwareAdjust
	 */
	public void setStartHardwareAdjust(int startHardwareAdjust) {
		this.startHardwareAdjust = startHardwareAdjust;
	}

	public Update getUpdate() {
		return update;
	}

	public void setUpdate(Update update) {
		this.update = update;
	}

	public Url getUrl() {
		return url;
	}

	public void setUrl(Url url) {
		this.url = url;
	}

	public ProcessorConfig getProcessorConfig() {
		return processorConfig;
	}

	public void setProcessorConfig(ProcessorConfig processorConfig) {
		this.processorConfig = processorConfig;
	}

	/**
	 * 获取框架的日志打印周期 单位秒
	 * 
	 * @return
	 */
	public int getFrameworkPrintInterval() {
		return frameworkPrintInterval;
	}

	public void setFrameworkPrintInterval(int frameworkPrintInterval) {
		this.frameworkPrintInterval = frameworkPrintInterval;
	}

	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	/**
	 * 是否需要启动更新 0 不启动 1启动
	 * 
	 * @return
	 */
	public int getStartUpdate() {
		return startUpdate;
	}

	public void setStartUpdate(int startUpdate) {
		this.startUpdate = startUpdate;
	}

	/**
	 * 有重复是否需要重新抓取 0不需要 1需要
	 * 
	 * @return
	 */
	public int getNeedAppend() {
		return needAppend;
	}

	/**
	 * 设置有重复是否需要重新抓取 0不需要 1需要
	 * 
	 * @param needReCrawl
	 */
	public void setNeedAppend(int needAppend) {
		this.needAppend = needAppend;
	}

	public List<ExtractorBelongingsAlgo> getExtractorBelongingsAlgos() {
		return extractorBelongingsAlgos;
	}

	public void setExtractorBelongingsAlgos(
			List<ExtractorBelongingsAlgo> extractorBelongingsAlgos) {
		this.extractorBelongingsAlgos = extractorBelongingsAlgos;
	}

	public static void main(String[] args) {
		CrawlConfig config = new CrawlConfig();
		config.setStartHardwareAdjust(0);

		config.setStartUpdate(0);
	}

}
